// 库存管理接口
import request from "@/common/request.js";
const api = {
  staff: "/staff/",
  group: "/group/",
  role: "/role/",
};

const acUserApi = {
  get_role(params) {
    return request({
      url: api.role,
      method: "get",
      params,
    });
  },
  get_group(params) {
    return request({
      url: api.group,
      method: "get",
      params,
    });
  },

  get_staff(params) {
    return request({
      url: api.staff,
      method: "get",
      params,
    });
  },

  staff_detail(id) {
    return request({
      url: api.staff + id,
      method: "get",
    });
  },

  post_staff(data) {
    return request({
      url: api.staff,
      method: "post",
      data,
    });
  },

  patch_staff(data, id) {
    return request({
      url: api.staff + id + "/",
      method: "patch",
      data,
    });
  },

  delete_staff(id) {
    return request({
      url: api.staff + id + "/",
      method: "delete",
    });
  },
};
export default acUserApi;
